﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WoWConnecter
{
    /// <summary>
    /// Per player
    /// </summary>
    [Flags]
    public enum ChannelMemberFlags
    {
        None = 0,
        Owner = 0x1,
        Moderator = 0x2,
        Voiced = 0x4,
        Muted = 0x8,
        Custom = 0x10, // ?
        VoiceMuted = 0x20,
    }

    public enum ClientId
    {
        /// <summary>
        /// Classic WoW
        /// </summary>
        Original = 0,
        /// <summary>
        /// The Burning Crusade
        /// </summary>
        TBC = 1,
        /// <summary>
        /// Wrath of the Lich King
        /// </summary>
        Wotlk = 2
    }

    /// <summary>
    /// Logout Codes used in Logout Sequence on the Game
    /// </summary>
    public enum LogoutResponseCodes // byte???
    {
        LOGOUT_RESPONSE_ACCEPTED = 00, //$00
        LOGOUT_RESPONSE_DENIED = 0xC //$0C
    }

    [Flags]
    public enum GroupMemberFlags : byte
    {
        Normal = 0x0,
        Assistant = 0x1,
        MainTank = 0x2,
        MainAssistant = 0x4
    }

    /// <summary>
    /// Priviledge levels
    /// </summary>
    public enum GroupPrivs
    {
        Normal = 0,
        Assistant,
        MainAsisstant,
        Leader
    }

    public enum SkillCategory
    {
        /// <summary>
        /// Only "Pet - Raveger" and "Pet Event - Remote Control"
        /// </summary>
        Invalid = -1,
        /// <summary>
        /// Strength, Agility, etc.
        /// </summary>
        Attribute = 5,
        /// <summary>
        /// Bow, Gun, Sword, etc.
        /// </summary>
        WeaponProficiency = 6,
        /// <summary>
        /// Any kind of ability + spell that are obtainable through vendors and talents
        /// </summary>
        ClassSkill = 7,
        /// <summary>
        /// Cloth, Leather, Mail, Plate
        /// </summary>
        ArmorProficiency = 8,
        /// <summary>
        /// Cooking, First Aid, Fishing, Riding
        /// </summary>
        SecondarySkill = 9,
        /// <summary>
        /// Common, Orcish, Darnassian, Gutterspeak, etc.
        /// </summary>
        Language = 10,
        /// <summary>
        /// Alchemy, Blacksmithing, Engineering, Leatherworking, Tailoring, Jewelcrafting,
        /// Herbalism, Mining, Skinning, Enchanting, Inscription
        /// </summary>
        Profession = 11,
        NotDisplayed = 12
    }

    public enum SkillAcquireMethod
    {
        OnLearningSkill = 1,
        InitialClassOrRaceSkill = 2,
    }

    public enum LoadStrategy
    {
        File = 0,
        Directory = 1,
        DirectoryRecursive = 2
    }

    public enum ChatTag : byte
    {
        None = 0,
        AFK = 1,
        //QA = 2,
        DND = 3,
        GM = 4
    }

    /// <summary>
    /// Same as <see cref="ChatChannelFlagsClient"/> but according to how its read  from DBC files.
    /// The client actually expects the format defined in <see cref="ChatChannelFlagsClient"/>.
    /// </summary>
    [Flags]
    public enum ChatChannelFlags : uint
    {
        None = 0,
        AutoJoin = 0x1, // General, Trade, LocalDefense, LookingForGroup.
        ZoneSpecific = 0x2,
        Global = 0x4,
        Trade = 0x8,
        //CityOnly = 0x30,
        CityOnly = 0x20,
        Defense = 0x10000,
        RequiresUnguilded = 0x20000,
        LookingForGroup = 0x40000
    }

    // May be only used in client
    public enum UnitNameType
    {
        UNITNAME_TITLE_PET = 1,
        UNITNAME_TITLE_MINION,
        UNITNAME_TITLE_GUARDIAN,
        UNITNAME_TITLE_CREATION,
        UNITNAME_TITLE_COMPANION,
    }

    public enum GameObjectAnimState
    {
        Closed,
        Opening,
        Open,
        Closing,
        Custom1,
        Custom2,
        Custom3,
        Custom4,
        Despawn,
    }

    public enum InstanceResetFailed
    {
        PlayersInside,
        PlayersOffline,
        PlayersZoning
    }

    public enum InstanceTransferFailed
    {
        InstanceFull = 1,
        InstanceNotFound,
        TooManyInstancesRecently
    }

    public enum TradeStatus
    {
        PlayerBusy = 0,
        /// <summary>
        /// Client will send CMSG_BUSY_TRADE if already in a trade
        /// </summary>
        Proposed = 1,
        Initiated = 2,
        Cancelled = 3,
        Accepted = 4,
        AlreadyTrading = 5,
        PlayerNotFound = 6,
        StateChanged = 7,
        Complete = 8,
        Denied = 9,
        /// <summary>
        /// "Trade target is too far away."
        /// </summary>
        TooFarAway = 10,
        /// <summary>
        /// "Target is unfriendly."
        /// </summary>
        WrongFaction = 11,
        Failed = 12,
        TargetDead = 13,
        Petition = 14,
        PlayerIgnored = 15,
        /// <summary>
        /// "Target is stunned"; -- Trade failure
        /// </summary>
        TargetStunned = 16,
        /// <summary>
        /// "You can't do that when you're dead."
        /// </summary>
        PlayerDead = 17,
        /// <summary>
        /// "You can't trade with dead players."
        /// </summary>
        TradeTargetDead = 18,
        /// <summary>
        /// "You are logging out"
        /// </summary>
        LoggingOut = 19,
        /// <summary>
        /// "That player is logging out"
        /// </summary>
        TargetLoggingOut = 20,
        /// <summary>
        /// "Trial accounts cannot perform that action"
        /// </summary>
        TrialAccountRestriction = 21,
        /// <summary>
        /// "You may only trade conjured items to players from other realms"
        /// </summary>
        WrongRealm = 22,
    }

    public enum TradeData
    {
        Give = 0x00,
        Receive = 0x01,
    }

    #region Realm Login
    public enum VersionComparison
    {
        LessThan = -1,
        LessThanOrExact = 0,
        Exact = 1
    }

    [Flags]
    public enum CharEnumFlags : int
    {
        None = 0,
        Alive = 0x1,
        //Flag_0x2 = 0x2,
        LockedForTransfer = 0x4,
        //Flag_0x8 = 0x8,
        //Flag_0x10 = 0x10, // No Visible Change
        HideHelm = 0x400,
        HideCloak = 0x800,
        Ghost = 0x2000, // Correct
        NeedsRename = 0x4000, // Correct
        Unknown = 0xA00000,
        LockedForBilling = 0x1000000 // Correct
    }

    public enum RealmPopulation
    {
        Low = 0,
        Medium = 1,
        High = 2,
        New = 200,
        Full = 400,
        Recommended = 600
    }
    #endregion

    #region Movement and Sitting
    public enum MovementState
    {
        Root = 1,
        Unroot = 2,
        WalkOnWater = 3,
        WalkOnLand = 4,
    }

    public enum MovementType
    {
        Walk,
        WalkBack,
        Run,
        Swim,
        SwimBack,
        Fly,
        FlyBack,
        Turn
    }

    public enum ChairHeight
    {
        Low = 0,
        Medium = 1,
        High = 2
    }
    #endregion

    #region Mail
    public enum MailResult : int
    {
        MailSent = 0,
        MoneyTaken = 1,
        ItemTaken = 2,
        ReturnedToSender = 3,
        Deleted = 4,
        MadePermanent = 5
    }

    public enum MailType : int
    {
        Normal = 0,
        CashOnDelivery = 1,
        Auction = 2,
        Creature = 3,
        GameObject = 4,
        Item = 5
    }

    public enum MailStationary
    {
        Unknown = 0x01,
        Normal = 0x29,
        GM = 0x3D,
        Auction = 0x3E,
        Val = 0x40,
        Chr = 0x41
    }

    public enum MailError
    {
        OK = 0,
        BAG_FULL = 1,
        CANNOT_SEND_TO_SELF = 2,
        NOT_ENOUGH_MONEY = 3,
        RECIPIENT_NOT_FOUND = 4,
        NOT_YOUR_ALLIANCE = 5,
        INTERNAL_ERROR = 6,
        DISABLED_FOR_TRIAL_ACCOUNT = 14,
        RECIPIENT_CAP_REACHED = 15,
        CANT_SEND_WRAPPED_COD = 16,
        MAIL_AND_CHAT_SUSPENDED = 17
    }

    public enum MailCheckedFlag
    {
        NotRead = 0,
        Read = 1,
        AuctionChecked = 4,
        CODPaymentChecked = 8,
        ReturnedChecked = 16
    }

    public enum MailAuctionAnswers : byte
    {
        Outbid = 0,
        Won = 1,
        Successful = 2,
        Expired = 3,
        CancelledToBidder = 4,
        Cancelled = 5
    }
    #endregion

    /// <summary>
    /// Results of char relation related commands
    /// </summary>
    public enum RelationResult
    {
        FRIEND_DB_ERROR = 0x00,
        FRIEND_LIST_FULL = 0x01,
        FRIEND_ONLINE = 0x02,
        FRIEND_OFFLINE = 0x03,
        FRIEND_NOT_FOUND = 0x04,
        FRIEND_REMOVED = 0x05,
        FRIEND_ADDED_ONLINE = 0x06,
        FRIEND_ADDED_OFFLINE = 0x07,
        FRIEND_ALREADY = 0x08,
        FRIEND_SELF = 0x09,
        FRIEND_ENEMY = 0x0A,
        IGNORE_LIST_FULL = 0x0B,
        IGNORE_SELF = 0x0C,
        IGNORE_NOT_FOUND = 0x0D,
        IGNORE_ALREADY = 0x0E,
        IGNORE_ADDED = 0x0F,
        IGNORE_REMOVED = 0x10,
        IGNORE_AMBIGUOUS = 0x11,
        MUTED_LIST_FULL = 0x12,
        MUTED_SELF = 0x13,
        MUTED_NOT_FOUND = 0x14,
        MUTED_ALREADY = 0x15,
        MUTED_ADDED = 0x16,
        MUTED_REMOVED = 0x17,
        MUTED_AMBIGUOUS = 0x18,
        UNKNOWN_1 = 0x19
    }

    #region ObjectTypes & Updates
    /// <summary>
    /// Update Types used in SMSG_UPDATE_OBJECT inside realm server
    /// </summary>
    public enum UpdateType : byte
    {
        Values = 0,
        Movement = 1,
        Create = 2,
        CreateSelf = 3,
        OutOfRange = 4,
        Near = 5
    }

    [Flags]
    public enum UpdateFlags : uint
    {
        Self = 0x1,
        Transport = 0x2,
        /// <summary>
        /// Attack Target
        /// </summary>
        AttackingTarget = 0x4,
        /// <summary>
        /// Value depends on object type
        /// 
        /// Items, Containers, GameObjects, DynamicObjects, and Corpses its high 4 bytes of guid
        /// </summary>
        Flag_0x8 = 0x8,
        /// <summary>
        /// Value depends on object type
        /// 
        /// Items, Containers, GameObjects, DynamicObjects, and Corpses its low 4 bytes of guid
        /// </summary>
        Flag_0x10 = 0x10,
        /// <summary>
        /// Mobile Objects
        /// </summary>
        Living = 0x20,
        /// <summary>
        /// Stationary Objects
        /// </summary>
        StationaryObject = 0x40,
        /// <summary>
        /// For Vehicles
        /// Int: VehicleId (from Vehicle.dbc)
        /// Float: Aim Adjustment
        /// </summary>
        Vehicle = 0x80,
        /// <summary>
        /// Appears to be stationary objects on transports
        /// </summary>
        StationaryObjectOnTransport = 0x100,

        /// <summary>
        /// This is an ulong that used to be in the GAMEOBJECT_ROTATION updatefield
        /// It is 3 values packed together, but of unknown use.
        /// </summary>
        HasRotation = 0x200,
    }

    /// <summary>
    /// Object Type Ids are used in SMSG_UPDATE_OBJECT inside realm server
    /// </summary>
    public enum ObjectTypeId
    {
        Object = 0,
        Item = 1,
        Container = 2,
        Unit = 3,
        Player = 4,
        GameObject = 5,
        DynamicObject = 6,
        Corpse = 7,
        AIGroup = 8,
        AreaTrigger = 9,
        Count,
        None = 0xFF
    }

    [Flags]
    public enum ObjectTypes : uint
    {
        None = 0,
        Object = 0x1,
        Item = 0x2,
        Container = 0x4,
        /// <summary>
        /// Any unit
        /// </summary>
        Unit = 0x8,
        Player = 0x10,
        GameObject = 0x20,
        /// <summary>
        /// Any Unit or GameObject
        /// </summary>
        Attackable = 0x28,
        DynamicObject = 0x40,
        Corpse = 0x80,
        AIGroup = 0x100,
        AreaTrigger = 0x200,
        All = 0xFFFF,
    }

    /// <summary>
    /// Custom enum to enable further distinction between Units
    /// </summary>
    [Flags]
    public enum ObjectTypeCustom
    {
        None = 0,
        Object = 0x1,
        Item = 0x2,
        Container = 0x6,
        /// <summary>
        /// Any unit
        /// </summary>
        Unit = 0x8,
        Player = 0x10,
        GameObject = 0x20,
        /// <summary>
        /// Any Unit or GameObject
        /// </summary>
        Attackable = 0x28,
        DynamicObject = 0x40,
        Corpse = 0x80,
        AIGroup = 0x100,
        AreaTrigger = 0x200,
        NPC = 0x1000,
        Pet = 0x2000,
        All = 0xFFFF
    }
    #endregion

    /// <summary>
    /// The Ids for the different races
    /// </summary>
    /// <remarks>Values come from column 1 of ChrClasses.dbc</remarks>
    public enum ClassId : uint
    {
        PetTalents = 0,
        Warrior = 1,
        Paladin = 2,
        Hunter = 3,
        Rogue = 4,
        Priest = 5,
        DeathKnight = 6,
        Shaman = 7,
        Mage = 8,
        Warlock = 9,
        //??	= 10
        Druid = 11,
        End
    }

    /// <summary>
    /// The mask is the corrosponding ClassId ^2 - 1
    /// </summary>
    [Flags]
    public enum ClassMask : uint
    {
        None = 0,
        Warrior = 0x0001,
        Paladin = 0x0002,
        Hunter = 0x0004,
        Rogue = 0x0008,

        Priest = 0x0010,
        DeathKnight = 0x0020,
        Shaman = 0x0040,
        Mage = 0x0080,

        Warlock = 0x0100,
        //unk = 0x0200,
        Druid = 0x0400,

        AllClasses1 = 0x7FFF,
        AllClasses2 = uint.MaxValue
    }

    /// <summary>
    /// The mask is used when translating PacketIn ClassMask values. 
    /// Similar to ClassMask but its values have twice the original value.
    /// </summary>
    [Flags]
    public enum ClassMask2 : uint
    {
        None = 0x0000,
        Warrior = 0x0002,
        Paladin = 0x0004,
        Hunter = 0x0008,
        Rogue = 0x00010,
        Priest = 0x0020,
        //unk = 0x0040,
        Shaman = 0x0080,
        Mage = 0x0100,
        Warlock = 0x0200,
        //unk = 0x0400,
        Druid = 0x0800,
        All = 0xFFFFFFFF
    }

    /// <summary>
    /// The Ids for the different races
    /// </summary>
    /// <remarks>Values come from column 1 of ChrRaces.dbc</remarks>
    public enum RaceId
    {
        None = 0,
        Human = 1,
        Orc = 2,
        Dwarf = 3,
        NightElf = 4,
        Undead = 5,
        Tauren = 6,
        Gnome = 7,
        Troll = 8,
        Goblin = 9,
        BloodElf = 10,
        Draenei = 11,
        FelOrc = 12,
        Naga = 13,
        Broken = 14,
        Skeleton = 15,
        End
    }

    /// <summary>
    /// The mask is the corrosponding RaceTypes-value ^2 - 1
    /// </summary>
    [Flags]
    public enum RaceMask : uint
    {
        Human = 0x00000001,
        Orc = 0x00000002,
        Dwarf = 0x00000004,
        NightElf = 0x00000008,
        Undead = 0x00000010,
        Tauren = 0x00000020,
        Gnome = 0x00000040,
        Troll = 0x00000080,
        Goblin = 0x00000100,
        BloodElf = 0x00000200,
        Draenei = 0x00000400,
        FelOrc = 0x00000800,
        Naga = 0x00001000,
        Broken = 0x00002000,
        Skeleton = 0x00004000,

        AllRaces1 = uint.MaxValue,
        AllRaces2 = 0x7FFF
    }

    /// <summary>
    /// The mask is used when translating PacketIn RaceMask values.
    ///  Similar to RaceMask but its values have twice the original value.
    /// </summary>
    [Flags]
    public enum RaceMask2 : uint
    {
        None = 0x00000000,
        Human = 0x00000002,
        Orc = 0x00000004,
        Dwarf = 0x00000008,
        NightElf = 0x00000010,
        Undead = 0x00000020,
        Tauren = 0x00000040,
        Gnome = 0x00000080,
        Troll = 0x00000100,
        Goblin = 0x00000200,
        BloodElf = 0x00000400,
        Draenei = 0x00000800,
        FelOrc = 0x00001000,
        Naga = 0x00002000,
        Broken = 0x00004000,
        Skeleton = 0x00008000,
        All = 0xFFFFFFFF
    }

    /// <summary>
    /// The gender types
    /// </summary>
    public enum GenderType : int
    {
        Male = 0,
        Female = 1,
        Neutral = 2
    }

    /// <summary>
    /// The power types (Mana, Rage, Energy, Focus, Happiness)
    /// </summary>
    public enum PowerType
    {
        Health = -2,
        Mana = 0,
        Rage = 1,
        Focus = 2,
        Energy = 3,
        Happiness = 4,
        Runes = 5,
        RunicPower = 6,
        Count
    }

    #region Chatting
    /// <summary>
    /// Message Types
    /// </summary>
    public enum ChatMsgType : int
    {
        Addon = -1,
        System = 0,
        Say = 1,
        Party = 2,
        Raid = 3,
        Guild = 4,
        Officer = 5,
        Yell = 6,
        Whisper = 7,

        WhisperInform = 8,

        MsgReply = 0x09,
        Emote = 10,
        //TextEmote = 0x0B,
        MonsterSay = 12,
        MonsterParty = 13,
        MonsterYell = 14,
        MonsterWhisper = 15,
        MonsterEmote = 16,

        Channel = 17,
        //ChannelJoin = 0x12,
        //ChannelLeave = 0x13,
        //ChannelList = 0x14,
        //ChannelNotice = 0x15,
        //ChannelNoticeUser = 0x16,
        AFK = 23,
        DND = 24,
        Ignored = 0x19,
        //Skill = 0x1A,
        //Loot = 0x1B,
        //Money = 0x1C,
        //Opening = 0x1D,
        //Tradeskills = 0x1E,
        //PetInfo = 0x1F,
        //CombatMiscInfo = 0x20,
        CombatXPGain = 0x21,
        //CombatHonorGain = 0x22,
        //CombatFactionChange = 0x23,

        BGSystemNeutral = 36,
        BGSystemAlliance = 37,
        BGSystemHorde = 38,

        RaidLeader = 39,
        RaidWarn = 40,

        RaidBossWhisper = 41,
        RaidBossEmote = 42,

        Filtered = 0x2B,
        Battleground = 44,
        BattlegroundLeader = 0x2D,
        Restricted = 0x2E,

        BN = 47,

        Type_48 = 48,
        Type_49 = 49,
        End
    }

    /// <summary>
    /// Chat Language Ids
    /// <remarks>Values from the first column of Languages.dbc</remarks>
    /// </summary>
    public enum ChatLanguage : uint
    {
        Universal2 = uint.MaxValue,
        Universal = 0,
        Orcish = 1,
        Darnassian = 2,
        Taurahe = 3,
        Dwarven = 6,
        Common = 7,
        DemonTongue = 8,
        Titan = 9,
        Thalassian = 10,
        Draconic = 11,
        OldTongue = 12,
        Gnomish = 13,
        Troll = 14,
        Gutterspeak = 33,
        Draenei = 35,
        End
    }

    /// <summary>
    /// A list of all HTML color-names. Use: <see href="ChatUtil.Colors[(int)ChatColor]"/>.
    /// See http://www.w3schools.com/html/html_colornames.asp
    /// </summary>
    public enum ChatColor
    {
        AliceBlue,
        AntiqueWhite,
        Aqua,
        Aquamarine,
        Azure,
        Beige,
        Bisque,
        Black,
        BlanchedAlmond,
        Blue,
        BlueViolet,
        Brown,
        BurlyWood,
        CadetBlue,
        Chartreuse,
        Chocolate,
        Coral,
        CornflowerBlue,
        Cornsilk,
        Crimson,
        Cyan,
        DarkBlue,
        DarkCyan,
        DarkGoldenRod,
        DarkGray,
        DarkGrey,
        DarkGreen,
        DarkKhaki,
        DarkMagenta,
        DarkOliveGreen,
        Darkorange,
        DarkOrchid,
        DarkRed,
        DarkSalmon,
        DarkSeaGreen,
        DarkSlateBlue,
        DarkSlateGray,
        DarkSlateGrey,
        DarkTurquoise,
        DarkViolet,
        DeepPink,
        DeepSkyBlue,
        DimGray,
        DimGrey,
        DodgerBlue,
        FireBrick,
        FloralWhite,
        ForestGreen,
        Fuchsia,
        Gainsboro,
        GhostWhite,
        Gold,
        GoldenRod,
        Gray,
        Grey,
        Green,
        GreenYellow,
        HoneyDew,
        HotPink,
        IndianRed,
        Indigo,
        Ivory,
        Khaki,
        Lavender,
        LavenderBlush,
        LawnGreen,
        LemonChiffon,
        LightBlue,
        LightCoral,
        LightCyan,
        LightGoldenRodYellow,
        LightGray,
        LightGrey,
        LightGreen,
        LightPink,
        LightSalmon,
        LightSeaGreen,
        LightSkyBlue,
        LightSlateGray,
        LightSlateGrey,
        LightSteelBlue,
        LightYellow,
        Lime,
        LimeGreen,
        Linen,
        Magenta,
        Maroon,
        MediumAquaMarine,
        MediumBlue,
        MediumOrchid,
        MediumPurple,
        MediumSeaGreen,
        MediumSlateBlue,
        MediumSpringGreen,
        MediumTurquoise,
        MediumVioletRed,
        MidnightBlue,
        MintCream,
        MistyRose,
        Moccasin,
        NavajoWhite,
        Navy,
        OldLace,
        Olive,
        OliveDrab,
        Orange,
        OrangeRed,
        Orchid,
        PaleGoldenRod,
        PaleGreen,
        PaleTurquoise,
        PaleVioletRed,
        PapayaWhip,
        PeachPuff,
        Peru,
        Pink,
        Plum,
        PowderBlue,
        Purple,
        Red,
        RosyBrown,
        RoyalBlue,
        SaddleBrown,
        Salmon,
        SandyBrown,
        SeaGreen,
        SeaShell,
        Sienna,
        Silver,
        SkyBlue,
        SlateBlue,
        SlateGray,
        SlateGrey,
        Snow,
        SpringGreen,
        SteelBlue,
        Tan,
        Teal,
        Thistle,
        Tomato,
        Turquoise,
        Violet,
        Wheat,
        White,
        WhiteSmoke,
        Yellow,
        YellowGreen
    }

    /// <summary>
    /// Shows a Character performing an action
    /// </summary>
    public enum EmoteType
    {
        None = 0,
        SimpleTalk = 1,
        SimpleBow = 2,
        SimpleWave = 3,
        SimpleCheer = 4,
        SimpleExclamation = 5,
        SimpleQuestion = 6,
        SimpleEat = 7,
        StateDance = 10,
        SimpleLaugh = 11,
        StateSleep = 12,
        StateSit = 13,
        SimpleRude = 14,
        SimpleRoar = 15,
        SimpleKneel = 16,
        SimpleKiss = 17,
        SimpleCry = 18,
        SimpleChicken = 19,
        SimpleBeg = 20,
        SimpleApplaud = 21,
        SimpleShout = 22,
        SimpleFlex = 23,
        SimpleShy = 24,
        SimplePoint = 25,
        StateStand = 26,
        StateReadyunarmed = 27,
        StateWork = 28,
        StatePoint = 29,
        StateNone = 30,
        SimpleWound = 33,
        SimpleWoundcritical = 34,
        SimpleAttackunarmed = 35,
        SimpleAttack1h = 36,
        SimpleAttack2htight = 37,
        SimpleAttack2hloose = 38,
        SimpleParryunarmed = 39,
        SimpleParryshield = 43,
        SimpleReadyunarmed = 44,
        SimpleReady1h = 45,
        SimpleReadybow = 48,
        SimpleSpellprecast = 50,
        SimpleSpellcast = 51,
        SimpleBattleroar = 53,
        SimpleSpecialattack1h = 54,
        SimpleKick = 60,
        SimpleAttackthrown = 61,
        StateStun = 64,
        StateDead = 65,
        SimpleSalute = 66,
        StateKneel = 68,
        StateUsestanding = 69,
        SimpleWaveNosheathe = 70,
        SimpleCheerNosheathe = 71,
        SimpleEatNosheathe = 92,
        StateStunNosheathe = 93,
        SimpleDance = 94,
        SimpleSaluteNosheath = 113,
        StateUsestandingNosheathe = 133,
        SimpleLaughNosheathe = 153,
        StateWorkNosheathe = 173,
        StateSpellprecast = 193,
        SimpleReadyrifle = 213,
        StateReadyrifle = 214,
        StateWorkNosheatheMining = 233,
        StateWorkNosheatheChopwood = 234,
        Old_SimpleLiftoff = 253,
        SimpleLiftoff = 254,
        SimpleYes = 273,
        SimpleNo = 274,
        SimpleTrain = 275,
        SimpleLand = 293,
        StateAtEase = 313,
        StateReady1h = 333,
        StateSpellkneelstart = 353,
        StateSubmerged = 373,
        SimpleSubmerge = 374,
        StateReady2h = 375,
        StateReadybow = 376,
        SimpleMountspecial = 377,
        StateTalk = 378,
        StateFishing = 379,
        SimpleFishing = 380,
        SimpleLoot = 381,
        StateWhirlwind = 382,
        StateDrowned = 383,
        StateHoldBow = 384,
        StateHoldRifle = 385,
        StateHoldThrown = 386,
        SimpleDrown = 387,
        SimpleStomp = 388,
        SimpleAttackoff = 389,
        SimpleAttackoffpierce = 390,
        StateRoar = 391,
        StateLaugh = 392,
        SimpleCreatureSpecial = 393,
        SimpleJumpandrun = 394,
        SimpleJumpend = 395,
        SimpleTalkNosheathe = 396,
        SimplePointNosheathe = 397,
        StateCannibalize = 398,
        SimpleJumpstart = 399,
        StateDancespecial = 400,
        SimpleDancespecial = 401,
        SimpleCustomspell01 = 402,
        SimpleCustomspell02 = 403,
        SimpleCustomspell03 = 404,
        SimpleCustomspell04 = 405,
        SimpleCustomspell05 = 406,
        SimpleCustomspell06 = 407,
        SimpleCustomspell07 = 408,
        SimpleCustomspell08 = 409,
        SimpleCustomspell09 = 410,
        SimpleCustomspell10 = 411,
        StateExclaim = 412
    }

    #region Calendar
    public enum CalendarEventFlags
    {
        Player = 0x001,
        System = 0x004,
        Holiday = 0x008,
        Locked = 0x10,
        AutoApprove = 0x20,
        GuildAnnouncement = 0x040,
        RaidLockout = 0x080,
        RaidReset = 0x200,
        GuildEvent = 0x400
    }

    public enum CalendarInviteType : byte
    {
        Normal = 0,
        Signup = 1
    }

    public enum CalendarModType : byte
    {
        Participant = 0,
        Moderator = 1,
        Creator = 2,
    }
    public enum CalendarEventModFlags
    {
        Moderator = 0x2,
        Creator = 0x4,
    }

    public enum CalendarEventType : byte
    {
        Raid = 0,
        Dungeon = 1,
        PvP = 2,
        Meeting = 3,
        Other = 4,
    }

    public enum CalendarInviteStatus : byte
    {
        Invited = 0,
        Accepted = 1,
        Declined = 2,
        Confirmed = 3,
        Out = 4,
        StandBy = 5,
        SignedUp = 6,
        NotSignedUp = 7,
    }

    public enum CalendarRepeatOption : byte
    {
        Never = 0,
        Weekly = 1,
        BiWeekly = 2,
        Monthly = 3,
    }

    public enum CalendarErrors : uint
    {
        GuildEventsExceeded = 1,
        EventsExceeded = 2,
        SelfInvitesExceeded = 3,
        OtherInvitesExceeded = 4,
        NoPermissions = 5,
        EventInvalid = 6,
        NotInvited = 7,
        InternalError = 8,
        PlayerNotInGuild = 9,
        AlreadyInvitedToEvent = 10,
        PlayerNotFound = 11,
        NotAllied = 12,
        PlayerIsIgnoringYou = 13,
        InvitesExceeded = 14,
        InvalidDate = 16,
        InvalidTime = 17,
        NeedsTitle = 19,
        EventPassed = 20,
        EventLocked = 21,
        DeleteCreatorFailed = 22,
        SystemDisabled = 24,
        RestrictedAccount = 25,
        ArenaEventsExceeded = 26,
        RestrictedLevel = 27,
        UserSquelched = 28,
        NoInvite = 29,
        WrongServer = 36,
        InviteWrongServer = 37,
        NoGuildInvites = 38,
        InvalidSignup = 39,
        NoModerator = 40
    }
    #endregion

    public enum TextEmote
    {
        Agree = 1,
        Amaze = 2,
        Angry = 3,
        Apologize = 4,
        Applaud = 5,
        Bashful = 6,
        Beckon = 7,
        Beg = 8,
        Bite = 9,
        Bleed = 10,
        Blink = 11,
        Blush = 12,
        Bonk = 13,
        Bored = 14,
        Bounce = 15,
        Brb = 16,
        Bow = 17,
        Burp = 18,
        Bye = 19,
        Cackle = 20,
        Cheer = 21,
        Chicken = 22,
        Chuckle = 23,
        Clap = 24,
        Confused = 25,
        Congratulate = 26,
        Cough = 27,
        Cower = 28,
        Crack = 29,
        Cringe = 30,
        Cry = 31,
        Curious = 32,
        Curtsey = 33,
        Dance = 34,
        Drink = 35,
        Drool = 36,
        Eat = 37,
        Eye = 38,
        Fart = 39,
        Fidget = 40,
        Flex = 41,
        Frown = 42,
        Gasp = 43,
        Gaze = 44,
        Giggle = 45,
        Glare = 46,
        Gloat = 47,
        Greet = 48,
        Grin = 49,
        Groan = 50,
        Grovel = 51,
        Guffaw = 52,
        Hail = 53,
        Happy = 54,
        Hello = 55,
        Hug = 56,
        Hungry = 57,
        Kiss = 58,
        Kneel = 59,
        Laugh = 60,
        Laydown = 61,
        Massage = 62,
        Moan = 63,
        Moon = 64,
        Mourn = 65,
        No = 66,
        Nod = 67,
        Nosepick = 68,
        Panic = 69,
        Peer = 70,
        Plead = 71,
        Point = 72,
        Poke = 73,
        Pray = 74,
        Roar = 75,
        Rofl = 76,
        Rude = 77,
        Salute = 78,
        Scratch = 79,
        Sexy = 80,
        Shake = 81,
        Shout = 82,
        Shrug = 83,
        Shy = 84,
        Sigh = 85,
        Sit = 86,
        Sleep = 87,
        Snarl = 88,
        Spit = 89,
        Stare = 90,
        Surprised = 91,
        Surrender = 92,
        Talk = 93,
        Talkex = 94,
        Talkq = 95,
        Tap = 96,
        Thank = 97,
        Threaten = 98,
        Tired = 99,
        Victory = 100,
        Wave = 101,
        Welcome = 102,
        Whine = 103,
        Whistle = 104,
        Work = 105,
        Yawn = 106,
        Boggle = 107,
        Calm = 108,
        Cold = 109,
        Comfort = 110,
        Cuddle = 111,
        Duck = 112,
        Insult = 113,
        Introduce = 114,
        Jk = 115,
        Lick = 116,
        Listen = 117,
        Lost = 118,
        Mock = 119,
        Ponder = 120,
        Pounce = 121,
        Praise = 122,
        Purr = 123,
        Puzzle = 124,
        Raise = 125,
        Ready = 126,
        Shimmy = 127,
        Shiver = 128,
        Shoo = 129,
        Slap = 130,
        Smirk = 131,
        Sniff = 132,
        Snub = 133,
        Soothe = 134,
        Stink = 135,
        Taunt = 136,
        Tease = 137,
        Thirsty = 138,
        Veto = 139,
        Snicker = 140,
        Stand = 141,
        Tickle = 142,
        Violin = 143,
        Smile = 163,
        Rasp = 183,
        Pity = 203,
        Growl = 204,
        Bark = 205,
        Scared = 223,
        Flop = 224,
        Love = 225,
        Moo = 226,
        Commend = 243,
        Joke = 329
    }

    #endregion

    /// <summary>
    /// Race model offset IDs
    /// </summary>
    public enum RaceModelOffset
    {
        Human = 49,
        Orc = 51,
        Dwarf = 53,
        NightElf = 55,
        Undead = 57,
        Tauren = 59,
        Troll = 1478,
        Gnome = 1563,
        BloodElf = 15476,
        Draenei = 16125
    }

    [Flags]
    public enum PlayerFlags : uint
    {
        None = 0,
        GroupLeader = 0x1,//2.4.2
        AFK = 0x2, // 2.4.2
        DND = 0x4, // 2.4.2
        GM = 0x8,
        Ghost = 0x10,
        Resting = 0x20,
        Flag_0x40 = 0x40,
        FreeForAllPVP = 0x80, // 2.4.2
        InPvPSanctuary = 0x100, // 2.4.2
        PVP = 0x200,
        HideHelm = 0x400,
        HideCloak = 0x800,
        PartialPlayTime = 0x1000, //played long time
        NoPlayTime = 0x2000, //played too long time
        OutOfBounds = 0x4000, // Lua_IsOutOfBounds
        Flag_0x8000 = 0x8000,
        Flag_0x10000 = 0x10000,
        Flag_0x20000 = 0x20000, // Taxi Time Test
        PVPTimerActive = 0x40000,
    }

    [Flags]
    public enum CorpseReleaseFlags : byte
    {
        None = 0,
        TrackStealthed = 0x02,
        ShowCorpseAutoReleaseTimer = 0x8,
        HideReleaseWindow = 0x10
    }



    public enum MapTransferError
    {
        TRANSFER_ABORT_ERROR = 0,
        TRANSFER_ABORT_MAX_PLAYERS = 1,
        TRANSFER_ABORT_NOT_FOUND = 2,
        TRANSFER_ABORT_TOO_MANY_INSTANCES = 3,
        TRANSFER_ABORT_ZONE_IN_COMBAT = 5,
        TRANSFER_ABORT_INSUF_EXPAN_LVL = 6,
    }

    public enum PetFood
    {
        None = 0,
        Meat = 1,
        Fish = 2,
        Cheese = 3,
        Bread = 4,
        Fungus = 5,
        Fruit = 6,
        RawMeat = 7,
        RawFish = 8
    }

    [Flags]
    public enum PetFoodMask : uint
    {
        Meat = 1,
        Fish = 2,
        Cheese = 4,
        Bread = 8,
        Fungus = 0x0010,
        Fruit = 0x0020,
        RawMeat = 0x0040,
        RawFish = 0x0080
    }

    public enum Material
    {
        None = 0,
        None2 = -1,
        Metal = 1,
        Wood = 2,
        Gem = 3,
        Cloth = 7
    }

    public enum PageMaterial
    {
        None2 = -1,
        None = 0,
        Parchment = 1,
        Stone = 2,
        Marble = 3,
        Silver = 4,
        Bronze = 5,
        Valentine = 6
    }

    /// <summary>
    /// Used in PLAYER_BYTES_2, 4th Byte
    /// </summary>
    public enum RestState : byte
    {
        Normal = 0x01,
        Resting = 0x02,
    }

    /// <summary>
    /// Group Type
    /// </summary>
    public enum GroupType : byte
    {
        Party = 0,
        Raid = 1
    }

    /// <summary>
    /// Group Update flags used when sending group member stats
    /// </summary>
    [Flags]
    public enum GroupUpdateFlags : uint
    {
        None = 0x00000000,
        Status = 0x00000001,
        Health = 0x00000002,
        MaxHealth = 0x00000004,
        PowerType = 0x00000008,
        Power = 0x00000010,
        MaxPower = 0x00000020,
        Level = 0x00000040,
        ZoneId = 0x00000080,
        Position = 0x00000100,
        Auras = 0x00000200,

        PetGuid = 0x00000400,
        PetName = 0x00000800,
        PetDisplayId = 0x00001000,
        PetHealth = 0x00002000,
        PetMaxHealth = 0x00004000,
        PetPowerType = 0x00008000,
        PetPower = 0x00010000,
        PetMaxPower = 0x00020000,
        PetAuras = 0x00040000,

        Vehicle = 0x00080000,

        Unused2 = 0x00100000,
        Unused3 = 0x00200000,
        Unused4 = 0x00400000,
        Unused5 = 0x00800000,
        Unused6 = 0x01000000,
        Unused7 = 0x02000000,
        Unused8 = 0x04000000,
        Unused9 = 0x08000000,
        Unused10 = 0x10000000,
        Unused11 = 0x20000000,
        Unused12 = 0x40000000,
        Unused13 = 0x80000000,

        UpdatePlayer = 0x000003FF,		// all players flags, without pet flags
        UpdatePet = 0x0007FC00,			// all pet flags
        UpdateFull = 0x0007FFFF			// all known flags
    }

    #region Looting
    /// <summary>
    /// Loot method
    /// </summary>
    public enum LootMethod : uint
    {
        FreeForAll = 0,
        RoundRobin = 1,
        MasterLoot = 2,
        GroupLoot = 3,
        NeedBeforeGreed = 4,
        End
    }

    public enum LootResponseType : byte
    {
        Fail = 0,
        Default = 1,
        Profession
    }

    public enum LootRollType : byte
    {
        Need = 1,
        Greed = 2,
        Pass = 3
    }

    public enum LootDecision : byte
    {
        /// <summary>
        /// Free to be taken
        /// </summary>
        Free = 0,
        /// <summary>
        /// Must be rolled for
        /// </summary>
        Rolling = 1,
        /// <summary>
        /// MasterLooter decides
        /// </summary>
        Master = 2
    }
    #endregion

    #region GOs

    /// <summary>
    /// 
    /// </summary>
    public enum LockInteractionGroup
    {
        None = 0,
        Key,
        /// <summary>
        /// See LockType.DBC
        /// </summary>
        Profession
    }

    /// <summary>
    /// Mask of NPCType
    /// </summary>
    [Flags]
    public enum CreatureTrackingMask : uint
    {
        None = 0,
    }

    /// <summary>
    /// Mask of LockInteractionType
    /// </summary>
    [Flags]
    public enum LockMask : uint
    {
        None = 0,
    }

    /// <summary>
    /// See LockType.dbc
    /// </summary>
    public enum LockInteractionType
    {
        None = 0,
        PickLock = 1,
        Herbalism = 2,
        Mining = 3,
        DisarmTrap = 4,
        Open = 5,
        Treasure = 6,
        ElvenGems = 7,
        Close = 8,
        ArmTrap = 9,
        QuickOpen = 10,
        QuickClose = 11,
        OpenTinkering = 12,
        OpenKneeling = 13,
        OpenAttacking = 14,

        /// <summary>
        /// For tracking Gahz'ridian and in GO:
        /// 
        /// Name: Gahz'ridian
        /// Id: 140971
        /// </summary>
        GahzRidian = 15,
        Blasting = 16,
        PvPOpen = 17,
        PvPClose = 18,
        Fishing = 19,
        Inscription = 20,
        OpenFromVehicle = 21,
    }
    #endregion

    [Flags]
    public enum CharacterStatus : byte
    {
        OFFLINE = 0,
        ONLINE = 1,
        AFK = 2,
        DND = 4
    }

    [Flags]
    public enum MovementFlags : uint
    {
        None = 0,
        Forward = 0x1,
        Backward = 0x2,
        StrafeLeft = 0x4,
        StrafeRight = 0x8,
        Left = 0x10,
        Right = 0x20,
        PitchUp = 0x40,
        PitchDown = 0x80,
        Walk = 0x100,
        OnTransport = 0x200,
        Levitating = 0x400,

        /// <summary>
        /// Used in Movement block
        /// </summary>
        UnitFlying = 0x800,//FlyUnk1 = 0x00000800,

        /// <summary>
        /// 0x1000
        /// </summary>
        Falling = 0x1000, // 2.4.3 confirmed. Lua_IsFalling

        Flag_13_0x2000 = 0x2000,
        Flag_14_0x4000 = 0x4000,
        Flag_15_0x8000 = 0x8000,
        Flag_16_0x10000 = 0x10000,
        Flag_17_0x20000 = 0x20000,
        Flag_18_0x40000 = 0x40000,
        Flag_19_0x80000 = 0x80000,
        Flag_20_0x100000 = 0x100000,

        /// <summary>
        /// 0x200000
        /// </summary>
        Swimming = 0x200000, // 2.4.3 confirmed. Lua_IsSwimming

        Flag_22_0x400000 = 0x400000,
        Flag_23_0x800000 = 0x800000,
        Flag_24_0x1000000 = 0x1000000,

        /// <summary>
        /// 0x2000000
        /// </summary>
        Flying = 0x2000000, // 2.4.3 confirmed for players. Lua_IsFlying

        /// <summary>
        /// 0x4000000
        /// </summary>
        Spline = 0x4000000, // ?
        SplinePath = 0x8000000,

        Waterwalking = 0x10000000,
        SafeFall = 0x20000000,
        Leviate = 0x40000000,
        Flag_31_0x80000000 = 0x80000000,

        //IsTranslating = 0xC0100F,
        IsTranslating = Forward | Backward | StrafeLeft | StrafeRight | Falling | Flag_22_0x400000 | Flag_23_0x800000,
    }

    [Flags]
    public enum MovementFlags2 : uint
    {
        None = 0,
        /// <summary>        
        /// 0x20        
        /// </summary>        
        AlwaysAllowPitching = 0x20,
        InterpMask = MoveFlag2_10_0x400 | MoveFlag2_11_0x800 | MoveFlag2_12_0x1000,

        MoveFlag2_0_0x1 = 0x1,//0
        MoveFlag2_1_0x2 = 0x2,//1
        MoveFlag2_2_0x4 = 0x4,//2
        MoveFlag2_3_0x8 = 0x8,//3
        MoveFlag2_4_0x10 = 0x10,//4
        MoveFlag2_6_0x40 = 0x40,//6
        MoveFlag2_7_0x80 = 0x80,//7
        MoveFlag2_8_0x100 = 0x100,//8
        MoveFlag2_9_0x200 = 0x200,//9
        MoveFlag2_10_0x400 = 0x400,//10
        MoveFlag2_11_0x800 = 0x800,//11
        MoveFlag2_12_0x1000 = 0x1000,//12
        MoveFlag2_13_0x2000 = 0x2000,//13
        MoveFlag2_14_0x4000 = 0x4000,//14
        MoveFlag2_15_0x8000 = 0x8000,//15
        MoveFlag2_16_0x10000 = 0x10000,//16
        MoveFlag2_17_0x20000 = 0x20000,//17
        MoveFlag2_18_0x40000 = 0x40000,//18
        MoveFlag2_19_0x80000 = 0x80000,//19
        MoveFlag2_20_0x100000 = 0x100000,//20
        MoveFlag2_21_0x200000 = 0x200000,//21
        MoveFlag2_22_0x400000 = 0x400000,//22
        MoveFlag2_23_0x800000 = 0x800000,//23
        MoveFlag2_24_0x1000000 = 0x1000000,//24
        MoveFlag2_25_0x2000000 = 0x2000000,//25
        MoveFlag2_26_0x4000000 = 0x4000000,//26
        MoveFlag2_27_0x8000000 = 0x8000000,//27
        MoveFlag2_28_0x10000000 = 0x10000000,//28
        MoveFlag2_29_0x20000000 = 0x20000000,//29
        MoveFlag2_30_0x40000000 = 0x40000000,//30
        MoveFlag2_31_0x80000000 = 0x80000000,//31
    }


    [Flags]
    public enum SplineFlags : uint
    {
        None = 0,

        XYZ = 0x8000,
        GUID = 0x10000,
        Orientation = 0x20000
    }

    [Flags]
    public enum ShapeShiftMask : uint
    {
        Cat = 1,
        TreeOfLife = 2,
        Travel = 4,
        Aqua = 8,
        Bear = 0x000000010,
        Ambient = 0x000000020,
        Ghoul = 0x000000040,
        DireBear = 0x00000080,
        CreatureBear = 0x00004000,
        CreatureCat = 0x00008000,
        GhostWolf = 0x00010000,
        BattleStance = 0x00020000,
        DefensiveStance = 0x00040000,
        BerserkerStance = 0x00080000,
        EpicFlightForm = 0x08000000,
        Shadow = 0x10000000,
        Stealth = 0x20000000,
        Moonkin = 0x40000000,
        SpiritOfRedemption = 0x80000000
    }

    [Flags]
    public enum ZoneFlags : uint
    {
        None = 0,
        Flag_0x40 = 0x40,

        /// <summary>
        /// Let's fight!
        /// </summary>
        Arena = 0x80,

        /// <summary>
        /// 
        /// </summary>
        CapitalCity = 0x100,
        Flag_0x200 = 0x200,

        CanFly = 0x400,

        /// <summary>
        /// No harm in this zone
        /// </summary>
        Sanctuary = 0x800,

        /// <summary>
        /// Areas with this flag are up on in the air. when you die you respawn alive at the graveyard
        /// </summary>
        RespawnNoCorpse = 0x1000,

        /// <summary>
        /// More fight!
        /// </summary>
        PVPObjectiveArea = 0x8000,

        /// <summary>
        /// Ignores FactionMask
        /// </summary>
        AlwaysContested = 0x40000,

        CanHearthAndResurrectFromArea = 0x8000000
    }

    public enum EnviromentalDamageType : uint
    {
        Exhausted = 0,
        Drowning = 1,
        Fall = 2,
        Lava = 3,
        Slime = 4,
        Fire = 5
    };

    public enum MapType
    {
        Normal = 0,
        Dungeon = 1,
        Raid = 2,
        Battleground = 3,
        Arena = 4
    }

    /// <summary>
    /// Mask for
    /// <remarks>Values are from column 20 of CharTitles.dbc. (1 lsh value) </remarks>
    /// </summary>
    public enum CharTitlesMask : ulong
    {
        Disabled = 0x00000000,
        None = 0x00000001,
        Private = 0x00000002,
        Corporal = 0x00000004,
        SergeantAlliance = 0x00000008,
        MasterSergeant = 0x00000010,
        SegeantMajor = 0x00000020,
        Knight = 0x00000040,
        KnightLieutenant = 0x00000080,
        KnightCaptain = 0x00000100,
        KnightChampion = 0x00000200,
        LieutenantCommander = 0x00000400,
        Commander = 0x00000800,
        Marshal = 0x00001000,
        FieldMarshal = 0x00002000,
        GrandMarshal = 0x00004000,
        Scout = 0x00008000,
        Grunt = 0x00010000,
        Sergeant = 0x00020000,
        SeniorSergeant = 0x00040000,
        FirstSergeant = 0x00080000,
        StoneGuard = 0x00100000,
        BloodGuard = 0x00200000,
        Legionnaire = 0x00400000,
        Centurion = 0x00800000,
        Champion = 0x01000000,
        LieutenantGeneral = 0x02000000,
        General = 0x04000000,
        Warlord = 0x08000000,
        HighWarlord = 0x10000000,

        Gladiator = 0x20000000,
        Duelist = 0x40000000,
        Rival = 0x80000000,
        Challenger = 0x100000000,
        ScarabLord = 0x200000000,
        Conqueror = 0x400000000,
        Justicar = 0x800000000,

        ChampionOfTheNaaru = 0x1000000000,
        MercilessGladiator = 0x2000000000,
    }

    /// <summary>
    /// Values sent in the SMSG_PARTY_COMMAND_RESULT packet
    /// </summary>
    public enum GroupResult
    {
        /// <summary>
        /// Either means everything is OK or the member left?
        /// </summary>
        NoError = 0,
        OfflineOrDoesntExist = 1,
        NotInYourParty = 2,
        NotInYourInstance = 3,
        GroupIsFull = 4,
        AlreadyInGroup = 5,
        PlayerNotInParty = 6,
        DontHavePermission = 7,
        TargetIsUnfriendly = 8,
        TargetIsIgnoringYou = 9,
        PendingMatch = 12,
        TrialCantInviteHighLevel = 13
    }

    public enum DungeonMode : byte
    {
        Normal = 0,
        Heroic = 1,
        End
    }

    #region Dueling
    public enum DuelTeam : uint
    {
        Challenger = 1,
        Rival = 2
    }

    public enum DuelWin : byte
    {
        Knockout = 0,
        OutOfRange = 1
    }
    #endregion

    #region Corpses
    [Flags]
    public enum CorpseFlags
    {
        None = 0,
        IsClaimed = 0x1,
        CorpseFlag_0x0002 = 0x2,
        Bones = 0x4,
        CorpseFlag_0x0008 = 0x8,
        CorpseFlag_0x0010 = 0x10,
        CorpseFlag_0x0020 = 0x20,
        CorpseFlag_0x0040 = 0x40,
    }

    [Flags]
    public enum CorpseDynamicFlags
    {
        None = 0,
        /// <summary>
        /// "Sparks" emerging from the Corpse
        /// </summary>
        PlayerLootable = 0x1
    }
    #endregion

    public enum StatType
    {
        Strength = 0,
        Agility = 1,
        Stamina = 2,
        Intellect = 3,
        Spirit = 4,
        None = 0xfffffff
    }

    /// <summary>
    /// Item modifiers
    /// </summary>
    public enum ItemModType
    {
        None = -1,
        Power = 0,
        Health = 1,
        /// <summary>
        /// Unused
        /// </summary>
        Unused = 2,
        Agility = 3,
        Strength = 4,
        Intellect = 5,
        Spirit = 6,
        Stamina = 7,

        WeaponSkillRating = 11,
        DefenseRating = 12,
        DodgeRating = 13,
        ParryRating = 14,
        BlockRating = 15,
        /// <summary>
        /// Unused
        /// </summary>
        MeleeHitRating = 16,
        /// <summary>
        /// Unused
        /// </summary>
        RangedHitRating = 17,
        SpellHitRating = 18,
        MeleeCriticalStrikeRating = 19,
        RangedCriticalStrikeRating = 20,
        SpellCriticalStrikeRating = 21,
        /// <summary>
        /// Unused
        /// </summary>
        MeleeHitAvoidanceRating = 22,
        /// <summary>
        /// Unused
        /// </summary>
        RangedHitAvoidanceRating = 23,
        /// <summary>
        /// Unused
        /// </summary>
        SpellHitAvoidanceRating = 24,
        /// <summary>
        /// Unused (see Resilience)
        /// </summary>
        MeleeCriticalAvoidanceRating = 25,
        /// <summary>
        /// Unused (see Resilience)
        /// </summary>
        RangedCriticalAvoidanceRating = 26,
        /// <summary>
        /// Unused (see Resilience)
        /// </summary>
        SpellCriticalAvoidanceRating = 27,
        MeleeHasteRating = 28,
        RangedHasteRating = 29,
        SpellHasteRating = 30,
        /// <summary>
        /// Melee and Ranged HitRating (no SpellHitRating)
        /// </summary>
        HitRating = 31,

        CriticalStrikeRating = 32,
        /// <summary>
        /// Unused
        /// </summary>
        HitAvoidanceRating = 33,
        /// <summary>
        /// Unused (see Resilience)
        /// </summary>
        CriticalAvoidanceRating = 34,
        ResilienceRating = 35,
        HasteRating = 36,
        ExpertiseRating = 37,

        // 3.x
        AttackPower = 38,
        RangedAttackPower = 39,
        FeralAttackPower = 40,
        SpellHealingDone = 41,
        SpellDamageDone = 42,
        ManaRegeneration = 43,
        ArmorRegenRating = 44,
        SpellPower = 45,

        // 3.2.2
        HealthRegenration = 46,
        SpellPenetration = 47,
        BlockValue = 48,

        End = 100
    }

    public enum ModifierMulti
    {
        Health = 0,
        Power,
        AttackerCritChance,
        BlockValue,
        AttackTime,
        PowerRegen,
        HealthRegen,
        CritChance,

        Strength,
        Agility,
        Stamina,
        Intellect,
        Spirit
    }

    public enum ModifierFlatInt
    {
        Power = 1,

        /// <summary>
        /// Overall HealthRegen
        /// </summary>
        HealthRegen,
        /// <summary>
        /// HealthRegen during Combat
        /// </summary>
        HealthRegenInCombat,
        /// <summary>
        /// HealthRegen while not in Combat
        /// </summary>
        HealthRegenNoCombat,

        PowerRegen,
        CritChance,
        BlockChance,
        BlockValue,
        ParryChance,
        RangedCritChance,
        HealingTaken,
        HealingPercent,
        HealingDone,

        RangedAttackPowerByPercentOfIntellect,

        DodgeChance
    }

    public enum AreaTriggerType : uint
    {
        None = 0,
        Instance = 1,
        QuestTrigger = 2,
        Rest = 3,
        Teleport = 4,
        Spell,
        Battleground,
        End
    }

    public enum AccountDataType
    {
        GlobalConfigCache = 0,
        PerCharacterConfigCache = 1,
        GlobalBindingsCache = 2,
        PerCharacterBindingsCache = 3,
        GlobalMacrosCache = 4,
        PerCharacterMacrosCache = 5,
        Layout = 6,
        ChatCache = 7,
    }

    public enum PetitionType
    {
        None,
        Guild,
        Arena2vs2,
        Arena3vs3,
        Arena5vs5
    }

    public static class EnumExtensions
    {
        public static bool Has(this MovementFlags flags, MovementFlags toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static bool Has(this MovementFlags2 flags, MovementFlags2 toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static bool Has(this SplineFlags flags, SplineFlags toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static bool HasFlag(this PlayerFlags flags, PlayerFlags toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static bool HasFlag(this UnitFlags flags, UnitFlags toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static bool Has(this UpdateFlags flag, UpdateFlags toCheck)
        {
            return (flag & toCheck) != 0;
        }

        public static bool HasFlag(this NPCFlags flags, NPCFlags toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static bool HasFlag(this UnitDynamicFlags flags, UnitDynamicFlags toCheck)
        {
            return (flags & toCheck) != 0;
        }

        public static ClassMask ToMask(this ClassId clss)
        {
            return (ClassMask)(1 << ((int)clss - 1));
        }

        public static bool Has(this ClassMask mask, ClassMask toCheck)
        {
            return (mask & toCheck) != 0;
        }

        public static bool Has(this ClassMask mask, ClassId toCheck)
        {
            var mask2 = toCheck.ToMask();
            return (mask & mask2) != 0;
        }

        public static bool Has(this RaceMask mask, RaceMask toCheck)
        {
            return (mask & toCheck) != 0;
        }

        public static bool HasFlag(this ItemFlags flags, ItemFlags toCheck)
        {
            return (flags & toCheck) != ItemFlags.None;
        }

        public static bool HasFlag(this PvPState flags, PvPState toCheck)
        {
            return (flags & toCheck) != PvPState.None;
        }
    }

    // Summary:
    //     Used in UNIT_FIELD_BYTES_2, 2nd byte
    [Flags]
    public enum PvPState
    {
        None = 0,
        PVP = 1,
        FFAPVP = 4,
        InPvPSanctuary = 8,
    }

    [Flags]
    public enum UnitFlags
    {
        None = 0,
        Flag_0_0x1 = 1,
        SelectableNotAttackable = 2,
        //
        // Summary:
        //     Applied in SPELL_AURA_MOD_CONFUSE (5) Applied in SPELL_AURA_MOD_FEAR (7)
        Influenced = 4,
        //
        // Summary:
        //     Enables Detailed Collision, Allows swimming When set for pets allows the
        //     popup menu to be shown (dismiss, rename, etc)
        PlayerControlled = 8,
        //
        // Summary:
        //     Rename? Dead?
        Flag_0x10 = 16,
        //
        // Summary:
        //     Spells are free, and some have no reagent cost
        Preparation = 32,
        //
        // Summary:
        //     Elite
        PlusMob = 64,
        //
        // Summary:
        //     Can select. Cannot be attacked
        SelectableNotAttackable_2 = 128,
        NotAttackable = 256,
        Flag_0x200 = 512,
        //
        // Summary:
        //     Looting animation is shown
        Looting = 1024,
        PetInCombat = 2048,
        Flag_12_0x1000 = 4096,
        Silenced = 8192,
        Flag_14_0x4000 = 16384,
        Flag_15_0x8000 = 32768,
        //
        // Summary:
        //     Can select. Cannot be attacked
        SelectableNotAttackable_3 = 65536,
        //
        // Summary:
        //     Pacifies the target, preventing spells from being cast that have PreventionType
        //     == Pacified
        Pacified = 131072,
        Stunned = 262144,
        CanPerformAction_Mask1 = 393216,
        //
        // Summary:
        //     Unit is in Combat
        Combat = 524288,
        //
        // Summary:
        //     Unit is currently on a taxi
        TaxiFlight = 1048576,
        Disarmed = 2097152,
        Confused = 4194304,
        Feared = 8388608,
        Possessed = 16777216,
        NotSelectable = 33554432,
        Skinnable = 67108864,
        Mounted = 134217728,
        Flag_28_0x10000000 = 268435456,
        Flag_29_0x20000000 = 536870912,
        Flag_30_0x40000000 = 1073741824
    }

    [Flags]
    public enum UnitDynamicFlags
    {
        None = 0,
        Lootable = 1,
        TrackUnit = 2,
        TaggedByOther = 4,
        TaggedByMe = 8,
        SpecialInfo = 16,
        Dead = 32,
        ReferAFriendLinked = 64,
        IsTappedByAllThreatList = 128,
    }
}
